<?php
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
include '../generallibraries/funcs.php';
$id=$_REQUEST['id'];

$listpurchase =$_SESSION['listpurchase'];
for($i=0;$i<count($listpurchase);$i++){
	if ($i==($id-1)){
			$listpurchase[$i][4]=generalFunctions::numberformat_to_basicString($_REQUEST['value']);
			
			$listpurchase[$i][5]=sprintf("%01.0f",(generalFunctions::numberformat_to_basicString($_REQUEST['value'])*11)/10);
			$listpurchase[$i][6]=$listpurchase[$i][3]*$listpurchase[$i][5];
	}
}

?>


			
				<?php 
				$i=1;
		
				foreach ($listpurchase as $purchase){?>

					<?php if($i==$id){?>
						<input  onkeypress="return enterTable(event,this.id,<?php echo count($listpurchase);?>,'1')" id="<?echo "txtVat".$i?>" type="text" name="pricevat[]"  onchange="chVatPurchase(this.value,<?=$i?>)" onkeyup="chVatPurchase(this.value,<?=$i?>)"  style="height: 24px; width: 96%; border: 1px solid #c4c0c9"  value="<?=number_format($purchase[5])?>" autocomplete="off"  />
					
					<?php }?>
				
				
				<?php 
			
				$i=$i+1;
				}?>

	
	
<?php $_SESSION['listpurchase']=$listpurchase;?>



